/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package webService;

import Facade.RestFacadeRemote;
import java.util.List;
import javax.ejb.EJB;
import javax.jws.WebService;
import javax.ejb.Stateless;
import javax.jws.WebMethod;
import javax.jws.WebParam;
import restaurante.entidades.Cliente;

/**
 *
 * @author omar
 */
@WebService(serviceName = "Restaurante")
@Stateless()
public class Restaurante {
    @EJB
    private RestFacadeRemote ejbRef;// Add business logic below. (Right-click in editor and choose
    // "Insert Code > Add Web Service Operation")

    @WebMethod(operationName = "listaClientes")
    public List<Cliente> listaClientes() {
        return ejbRef.listaClientes();
    }

    @WebMethod(operationName = "registrarCliente")
    public boolean registrarCliente(@WebParam(name = "cli") Cliente cli) {
        return ejbRef.registrarCliente(cli);
    }

    @WebMethod(operationName = "genCodCliente")
    public int genCodCliente() {
        return ejbRef.genCodCliente();
    }
    
}
